package cn.itcast.mapper;

import cn.itcast.pojo.Clazz;
import cn.itcast.pojo.ClazzQueryParam;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ClazzMapper {
    void insert(Clazz clazz);

    List<Clazz> findAll();

    List<Clazz> page(ClazzQueryParam clazzQueryParam);

    Clazz findById(@Param("id") Integer id);

    void updateClazz(Clazz clazz);

    @Delete("delete from clazz where id = #{id}")
    void deleteById(@Param("id") Integer id);
}
